package com_1;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File  f=new File("E:\\itcast");
 getAllPathFile(f);
    }
    public static  void getAllPathFile(File f){
        File[] files = f.listFiles();
        if(files!=null){
            for (File file : files) {
                if(file.isDirectory()){
                    getAllPathFile(file);
                }else{
                    String absolutePath = file.getAbsolutePath();
                    System.out.println(absolutePath);
                }
            }
        }
    }
}
